package com.itita.ww2.common;

import com.google.gson.GsonBuilder;

@SuppressWarnings("unused")
public class WebResponse {
	private boolean succ;
	private String data;
	private String errorMsg;

	public WebResponse() {
	}

	public WebResponse(boolean succ) {
		this.succ = succ;
	}

	public String toJson() {
		
		return new GsonBuilder().create().toJson(this);
	}

	public WebResponse setSucc(boolean succ) {
		this.succ = succ;
		return this;
	}

	public WebResponse setData(String data) {
		this.data = data;
		return this;
	}

	public WebResponse setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
		return this;
	}
}
